<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});




Route::get('index/index','Index\IndexController@index');
Route::get('index','Index\IndexController@index');

/*后台登录路由组*/
Route::group(['prefix'=>'admin','namespace'=>'Admin','middleware'=>['web','admin.login']],function(){
//    Route::get('login/login','LoginController@login')->name('adminlogin');
    Route::get('index/index','IndexController@index');
    Route::get("index",'IndexController@index');
});
Route::group(['prefix'=>'admin','namespace'=>'Admin','middleware'=>['web']],function(){
    Route::get('login/login','LoginController@login')->name('adminlogin');;
});

Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');
